package com.hzncc.flowable_diboot.contract.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
* 销售合同物料详情 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-09-09
* Copyright © MyCorp
*/

@TableName("mdl_sales_contract_mrl")
@Getter @Setter @Accessors(chain = true)
public class SalesContractMrl extends BaseModel {
    private static final long serialVersionUID = 1121658892685859403L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 是否推送
     */
    @TableField()
    private Boolean pushFlag;

    /**
     * 项目
     */
    @Length(max=100, message="项目长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String productName;

    /**
     * 删除标识
     */
    @TableField()
    private Boolean deletedFlag;

    /**
     * 物料号
     */
    @Length(max=50, message="物料号长度应小于50")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String mrlCode;

    /**
     * 物料描述
     */
    @Length(max=500, message="物料描述长度应小于500")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String mrlDesc;

    /**
     * 目标数量
     */
    @TableField()
    private BigDecimal targerQty;

    /**
     * 累计发货数
     */
    @TableField()
    private BigDecimal qtyShipped;

    /**
     * 未发货数量
     */
    @TableField()
    private BigDecimal qtyUnshipped;

    /**
     * 已发货金额
     */
    @TableField()
    private BigDecimal amount;

    /**
     * 发货状态
     */
    @TableField()
    private String shippingStatus;

    /**
     * 备注
     */
    @Length(max=500, message="备注长度应小于500")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String remark;

    /**
     * 销售合同主键
     */
    @Length(max=32, message="销售合同主键长度应小于32")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String salesContractId;

    /**
     * 推送状态
     */
    @TableField
    private Boolean pushStatus;

    /**
     * 是否可推送
     */
    @TableField
    private Boolean pushable;

}